<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/whatwg/html/issues/9799">
<link rel=match href="select-option-images-ref.html">

<select style="appearance:base-select">
  <button>button</button>
  <datalist>
    <option><img alt="" src="/images/green-16x16.png">green-16x16</option>
    <option class=two><img alt="" src="/images/red-16x16.png">red-16x16</option>
  </datalist>
</select>

<script>
const datalist = document.querySelector('datalist');
datalist.showPopover();
// <img> elements should still be rendered after removing and re-appending
const option = document.querySelector('option.two');
option.remove();
datalist.appendChild(option);
</script>
